<template>
  <div>
    <section class="mainmodule">
      <div class="mainlist">
        <ul>
          <li>
            <div class="icon_cjh"
                @click="handleLinkTo('order-lists')">
                订单列表
              <i class="icon-right"></i>
            </div>
          </li>
          <li>
            <div class="icon_cjh"
                @click="handleLinkTo('pointOrder')">
                积分兑换订单
              <i class="icon-right"></i>
            </div>
          </li>
        </ul>
          <ul>
          <li>
            <div class="backIndex"
                @click="handleLinkTo('index')">
                返回首页
            </div>
          </li>
        </ul>
      </div>
    </section>
    <!-- 授权弹出框 -->
    <small-login ref="smalllogin" :dzShowPop="true"></small-login>
  </div>
</template>
<script>
import Vue from 'vue'
import SmallLogin from '@/components/SmallLogin/smallLogin'
import small from '@/smallapp/small'

export default Vue.extend({
  components: {
    SmallLogin
  },
  mounted() {
    // console.log('small.checkLogin()', small.checkLogin())
    if (!small.checkLogin()) {
      this.$refs.smalllogin.openSmallLoginPop()
    }
  },
  methods: {
    handleLinkTo(url, data) {
      if (!small.checkLogin() && url !== 'index') {
        this.$refs.smalllogin.openSmallLoginPop()
      } else {
        this.$JumpName(this, url, data)
      }
    },
  },
})
</script>
<style lang="scss">
@import '../../../styles/user/index.scss';
@import '../../../styles/user/member/index';
.backIndex {
  text-align: center;
  margin-top: 20px;
}
</style>
